<%@ page import="com.chg.mymvc.entity.Item" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2020/7/13
  Time: 19:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<link href="css/main.css" rel="stylesheet">
<html>
<head>
    <title>Title</title>
    <script src="js/jquery.js" type="text/javascript"></script>
    <script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="ckeditor/ckeditor.js"type="text/javascript"></script>

</head>
<body>

<script>
    //给多行文本框起一个id   保证id唯一
    // 富文本编辑器  关键代码一行
    $(function(){
        CKEDITOR.replace("richtext");
    })



</script>

<!-- 新闻管理 -->
<div class="AccountManagement_c" id="NewsManagement_c">
    <div class="list" id="release_news">
        <ul class="list_h">
            <li class="b80"><label>发布新闻</label></li>
        </ul>
        <div class="list_b_c" id="release_news_in">
            <form action="addnews" method="post">
            <div class="release_news">
                <div class="news_title">
                    <label class="text_center">标题</label>
                    <input type="text" placeholder="填写标题" name="title">
                </div>



                <div class="column_name">
                    <label class="text_center">栏目</label>
                    <select class="column_name_release" name="selectedoption" >
                        <%List<Item> list= (List<Item>) request.getSession().getAttribute("itemsofperm");
                            System.out.println("list"+list);
                            if(list.size()<1){
                        %>
                        <option value="教务处">教务处</option>
                        <%} else{
                            for(Item item:list){

                        %>
                        <option value="<%=item.getPerm()%>">  <%=item.getPerm()%>  </option>

                        <%}
                        }%>
                    </select>
                </div>
                <textarea class="release_news_content" rows="50" cols="60" id="richtext" placeholder="编辑正文" name="content"></textarea>
                <button class="release_news_ok_btn text_center" type="submit">发<i>我</i>布</button>
            </div>

            </form>
        </div>
    </div>
</div>


<script>

    function  abc(str) {
        alert('11111');
        alert(11111);
        $("#itemid").val(str);
    };

</script>



</body>
</html>
